<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="RoverCommodity.RoverCommodityDeal"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="dataconn.dataconn"%>
<script  language="javascript">
<!-- Begin validation script  
function checkForm(){
	    if(document.form1.ComID1.value==""){
		alert("请输入商品名称！");
		return false;
		}
	    if(document.form1.SellerPh1.value==""){
		alert("请输入电话！");
		return false;
		}
		if(document.form1.ComPrice1.value=="")
		{
			alert("输入商品价格！");
		    return false;
		}
	return true;
	}
-->
</script>
<html>
<head>
<title>流动站中商品信息上传</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
<FORM NAME="form1" METHOD="POST" ACTION="SaveRoverCommodity.jsp"
ENCTYPE="multipart/form-data" onSubmit="return checkForm()">
 <table width="90%" border="0" cellspacing="1" cellpadding="0" align="center">
  <tr align=center>
    <td  nowrap align="left" >
   	</td>
  </tr>
 </table>	  
  <table  width="90%" border="0" cellspacing="2" cellpadding="0" bgcolor="#FFFBEC" align="center">
    <tr> 
      <td width="20%" align="right">商品名称：</td>
      <td width="80%" > 
        <input type="text" name="ComID1" size="30">
        * </td>
    </tr>
    <tr> 
      <td width="20%" align="right">姓名：</td>
      <td width="80%" > 
        <input type="text" name="SellerName1" size="30">
         </td>
    </tr>
    <tr> 
      <td width="20%" align="right">电话：</td>
      <td width="80%" > 
        <input type="text" name="SellerPh1" size="30">
        * </td>
    </tr>
    <tr>
      <td width="20%" align="right">上传商品图片：</td>
      <td width="80%" > 
      <input name="ComImage1" type="file" id="ComImage1" size="25" maxlength="200" dataType="Require" msg="选择上传商品图片" />
       小于20兆*</td>
    </tr>
    <tr> 
      <td width="20%" align="right">商品简介：</td>
      <td width="80%" > 
        <textarea type="text" name="DesCribe1" rows=3 cols=24 size="30"> </textarea>
         </td>
    </tr>
    	
    <tr> 
      <td width="20%" align="right">流动站：</td>
      <td>
          <SELECT id=typeId style="WIDTH: 110px" name="RovID"> 
          <% 
          RoverCommodityDeal a=new RoverCommodityDeal();
          ResultSet rs=a.CalAllRover();
          if(rs.next())
          {
          	 out.print( " <option   value= '"+rs.getString(1).trim()+"' selected> "+rs.getString(3).trim()+" </option> "); 
          }
           try{ 
				while(rs.next()){ 
				out.print( " <option   value= '"+rs.getString(1).trim()+"'> "+rs.getString(3).trim()+" </option> "); 
			} 
			} 
			catch(Exception   e){e.printStackTrace();} 
          %>
          </SELECT> 
      *</td>
    </tr>
    	
    <tr> 
      <td width="20%" align="right" >商品价格：</td>
      <td width="80%" > 
        <input type="text" name="ComPrice1" size="30">
        * </td>
    </tr>
    
     <tr> 
      <td width="20%" align="right">新旧程度：</td>
      <td>
          <SELECT id=typeId style="WIDTH: 110px" name="Recency"> 
          <% 
             for(int i=1;i<=10;i++)
             {
          	 out.print( " <option   value= '"+i+"' selected> "+i+" </option> ");
             }
          %>
          </SELECT> 
      成新*</td>
    
    <tr> 
      <td width="20%" align="right">备注：</td>
      <td width="80%" > 
        <textarea type="textarea" name="ComInf1" size="30" rows=3 cols=24 ></textarea>
        </td>
    </tr>
  </table>
<table width="366" border="0" cellspacing="2" cellpadding="0" align="left">

    <tr align="left"> 
      <td colspan="2" height="12" align="right"> 
        <input type="submit" value="提交">
      </td>
      <td colspan="2" height="12" align="center"> 
        <input type="reset" value="重置">
      </td>
    </tr>
  </table>
</FORM>
</body>
</html>


